package com.lemonfish.pojo.vo;

import com.diboot.core.binding.annotation.BindEntityList;
import com.lemonfish.pojo.entity.Permission;
import com.lemonfish.pojo.entity.Role;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 角色 VO定义
 *
 * @author Lemonfish
 * @version 1.0
 * @date 2020-03-02
 * Copyright © ï¿½Å³ï¿½
 */
@Accessors(chain = true)
@Setter
@Getter
@ToString
public class RoleVO extends Role {

    private static final long serialVersionUID = -5525546224237855L;

    // 通过中间表的多-多Entity实体关联
    @BindEntityList(entity = Permission.class, condition = "this.id=role_permission.role_id AND role_permission.permission_id=id AND role_permission.is_deleted=0")
    private List<Permission> permissionList;


}
